- if ( !( defined( 'MW_PHPUNIT_TEST' ) || defined( 'MW_PARSER_TEST' ) ) ) {
- throw new MWException( __METHOD__ . '() should be called only from unit tests!' );
- }
+ // TODO: manage service instances in MediaWikiServices
+ MediaWikiServices::failUnlessBootstrapping( __METHOD__ );